/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package newpackage;

import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.*;

/**
 *
 * @author sony
 */
public class lat1 extends JFrame{
JMenu utama1,utama2;
JMenuBar bar;
JMenuItem menua,menub,menuc,menu2a;
JLabel input;
JTextField password;

public lat1(){
    this.setTitle("uts satu");
//    setLocation(100,200);
    this.setSize(250,250);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    bar = new JMenuBar();
    setJMenuBar(bar);

    utama1 = new JMenu("utama1");
    bar.add(utama1);

    utama2 = new JMenu("utama2");
    bar.add(utama2);

    menua=new JMenuItem("menua");
    utama1.add(menua);

    menub=new JMenuItem("menub");
    utama1.add(menub);

    menuc=new JMenuItem("menuc");
    utama1.add(menuc);

    menu2a=new JMenuItem("menu2a");
    utama2.add(menu2a);

    input=new JLabel("input pswd");
    this.add(input);

    password=new JTextField(10);
    this.add(password);

    this.setLayout(new FlowLayout());

    JButton buttonOk=new JButton();
    buttonOk.setText("ok");
    this.add(buttonOk);

}
}
